﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ShoppingEvent
{
    public class Shop
    {
        private int num;
        private int total;

        public Shop(int Num, int Total)
        {
            Num = num;
            Total = total;
        }



        #region
        //public void Add(int s)
        //{
        //    total += s;
        //    if (total >= num)
        //    {
        //        ShopEventArgs shop = new ShopEventArgs();
        //        shop.Num = num;
        //        shop.Tatol = total;

        //    }
        //    if (total < num)
        //    {
        //        Console.WriteLine("商品不足");
        //    }

        //}
        #endregion

        private void ShopEventArgs(ShopEventArgs s)//事件订阅者类
        {
            ShopEvent?.Invoke(this, s);
        }
        public event EventHandler<ShopEventArgs> ShopEvent;//事件处理器
    }
}
